package com.pz.art.mapper;

import com.pz.art.domain.AssoEvents;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface EventsMapper {
    /**
     * 查询活动
     *
     * @param id 活动主键
     * @return 活动
     */
    public AssoEvents selectAssoEventsById(Long id);

    /**
     * 查询活动列表
     *
     * @param assoEvents 活动
     * @return 活动集合
     */
    public List<AssoEvents> selectAssoEventsList(AssoEvents assoEvents);

    /**
     * 新增活动
     *
     * @param assoEvents 活动
     * @return 结果
     */
    public int insertAssoEvents(AssoEvents assoEvents);

    /**
     * 修改活动
     *
     * @param assoEvents 活动
     * @return 结果
     */
    public int updateAssoEvents(AssoEvents assoEvents);

    /**
     * 删除活动
     *
     * @param id 活动主键
     * @return 结果
     */
    public int deleteAssoEventsById(Long id);

    /**
     * 批量删除活动
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAssoEventsByIds(Long[] ids);

    public List<AssoEvents> getEventsByUnitId(Long unit_id);

    public int inAssoApplyInfo(@Param("events_id")Long events_id, @Param("unit_id")Long unit_id, @Param("create_time")Date create_time);

    public List<AssoEvents> selectApplyAssoEventsList(@Param("assoEvents")AssoEvents assoEvents,@Param("unit_id")Long unit_id);

    public void updateAssoEventsStatus(Long events_id);

    List<AssoEvents> selectApplyStatusAssoEventsList(AssoEvents assoEvents);

    int examineevents(AssoEvents assoEvents);

    public int toaddeventsmember(@Param("eventsIds")Integer eventsIds, @Param("unitMembercount")int unitMembercount);
}
